Skip to content

ext/standard: Refactor exec.c public APIs to use zend_string pointers #14353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 29, 2024

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented May 29, 2024

This removes the need to call strlen() when we already know the length of the strings.

Convert E_ERRORs to throw ValueErrors instead for a graceful shutdown where destructors are run instead of just bailing.

@alexdowad
Copy link
Contributor

alexdowad commented May 29, 2024 via email

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSTM

@Girgias Girgias merged commit 48d5ae9 into php:master May 29, 2024
9 of 10 checks passed
@Girgias Girgias deleted the exec-refactor branch May 29, 2024 09:59
DanielEScherzer added a commit to DanielEScherzer/php-src that referenced this pull request Sep 19, 2024
While `php_escape_shell_cmd()` did indeed `emalloc` a string that needed to be
freed by the caller in the original implementation that was put in GitHub
(see commit 257de2b) a few months ago the
return type was changed to use `zend_string`, see php#14353.
DanielEScherzer added a commit to DanielEScherzer/php-src that referenced this pull request Oct 9, 2024
While `php_escape_shell_cmd()` did indeed `emalloc` a string that needed to be
freed by the caller in the original implementation that was put in GitHub
(see commit 257de2b) a few months ago the
return type was changed to use `zend_string`, see php#14353.
iluuu1994 pushed a commit that referenced this pull request Oct 12, 2024
While `php_escape_shell_cmd()` did indeed `emalloc` a string that needed to be
freed by the caller in the original implementation that was put in GitHub
(see commit 257de2b) a few months ago the
return type was changed to use `zend_string`, see #14353.

Closes GH-16313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants